package com.oktest.measure.db.room

import androidx.room.*
import com.oktest.measure.entity.Device
import com.oktest.measure.entity.Type

/**
 * @Author hhh
 * @Date 2020/10/24
 */
@Dao
interface DeviceDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(list: List<Device>)
    @Query("select * from device")
    fun queryAll(): List<Device>
    @Query("select * from type where deviceId=:id")
    fun types(id: Long): List<Type>

    @Update(onConflict = OnConflictStrategy.REPLACE)
    fun update(device: Device)
}